package com.xgggh.app;

import android.app.Application;
import android.content.Context;
import android.support.multidex.MultiDex;

import com.taobao.weex.InitConfig;
import com.taobao.weex.WXSDKEngine;
import com.tencent.bugly.Bugly;
import com.tencent.bugly.crashreport.CrashReport;
import com.xgggh.redpack.BuildConfig;
import com.xgggh.utils.weex.ImageAdapter;

/**
 * Created by az on 2018/5/25.
 */

public class RedApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        //CrashReport.initCrashReport(getApplicationContext());
        Bugly.init(getApplicationContext(), BuildConfig.BUGLY_APP_ID, BuildConfig.DEBUG);
        //weex
        InitConfig config=new InitConfig.Builder().setImgAdapter(new ImageAdapter()).build();
        WXSDKEngine.initialize(this,config);
    }

    @Override
    protected void attachBaseContext(Context context) {
        super.attachBaseContext(context);
        MultiDex.install(this);
    }

}
